$(function() {
	validateFrom();
});

function validateFrom() {
	//location.href="../../manager_userbasic/validateName";
	
	$("#addForm").validate(
			{
				rules : {
					
					ubPwd : {
						required : true,
						minlength : 6
					},
					ubPhone : {
						digits : true,
						minlength : 11,
						maxlength : 11
					},
					ubEmail : {
						email : true
					}
				},
				messages : {
					ubPwd : {
						required : "请输入密码。",
						minlength : "至少输入6位的密码。"
					}
				},
				success : function(a) {
					a.html("&nbsp;").attr("class", "success").siblings("i")
							.remove();
				},
				errorPlacement : function(b, a) {
					$(a).next("i").find(".success").remove();
					b.appendTo(a.next("i"));
				}
			});
}